package org.programmers.anonymous.fightrobots.model;

/**
 * Implements the error message class
 * @author David Rodriguez, Francisco Villalba
 *
 */
public class ErrorMessage extends Message{
	
	public enum ErrorType {BUSY};
	
	private ErrorType myError;
	
	
	
	public ErrorMessage(){
		super();
	}
	
	/**
	 * Default constructor means the error is BUSY
	 * @param sender
	 * @param receiver
	 */
	public ErrorMessage(IURLId sender, IURLId receiver) {
		super(sender, receiver);
		this.myError = ErrorType.BUSY;
	}
	
	/**
	 * Composed constructor
	 * 
	 * @param origin
	 * @param remote
	 * @param errorType - The kind of error
	 */
	public ErrorMessage(IURLId origin, IURLId remote, ErrorType errorType) {
		super(origin, remote);
		this.myError = errorType;
	}
	/**
	 * Error getter
	 * @return - The ErrorType
	 */
	public ErrorType getErrorType(){
		return this.myError;
	}
	
	/**
	 * Setter for the error 
	 * @param newError
	 */
	public void setErrorType(ErrorType newError){
		this.myError = newError;
	}

}
